Let bind golden-ratio-mode when showing window
authorjustbur <justin@burkett.cc>
Tue, 29 Sep 2015 15:36:48 +0000 (11:36 -0400)
committerjustbur <justin@burkett.cc>
Tue, 29 Sep 2015 15:38:01 +0000 (11:38 -0400)
Prevents golden-ratio from changing size of which-key buffer

Fix #67

which-key.el

index fa827f5b49b5557c6cdf0d088a0f938430799ae9..b7d8bb04f9f42ac9714c9bc70e3d1816addd5b88 100644 (file)
@@ -732,13 +732,14 @@ total height."
 ACT-POPUP-DIM includes the dimensions, (height . width) of the
 buffer text to be displayed in the popup.  Return nil if no window
 is shown, or if there is no need to start the closing timer."
-  (when (and (> (car act-popup-dim) 0) (> (cdr act-popup-dim) 0))
-    (cl-case which-key-popup-type
-      ;; Not called for minibuffer
-      ;; (minibuffer (which-key--show-buffer-minibuffer act-popup-dim))
-      (side-window (which-key--show-buffer-side-window act-popup-dim))
-      (frame (which-key--show-buffer-frame act-popup-dim))
-      (custom (funcall which-key-custom-show-popup-function act-popup-dim)))))
+  (let (golden-ratio-mode)
+    (when (and (> (car act-popup-dim) 0) (> (cdr act-popup-dim) 0))
+      (cl-case which-key-popup-type
+        ;; Not called for minibuffer
+        ;; (minibuffer (which-key--show-buffer-minibuffer act-popup-dim))
+        (side-window (which-key--show-buffer-side-window act-popup-dim))
+        (frame (which-key--show-buffer-frame act-popup-dim))
+        (custom (funcall which-key-custom-show-popup-function act-popup-dim))))))
 
 (defun which-key--fit-buffer-to-window-horizontally (&optional window &rest params)
   "Slightly modified version of `fit-buffer-to-window'.